package com.zr.model;
// Generated 2016-6-19 19:35:13 by Hibernate Tools 3.2.2.GA

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * TCarstate generated by hbm2java
 */
@Entity
@Table(name = "t_carstate", catalog = "ld_sys")
public class TCarstate implements java.io.Serializable {

	private Integer csid;
	private String csname;
	private Set<TCar> TCars = new HashSet<TCar>();

	public TCarstate() {
	}

	public TCarstate(String csname, Set<TCar> TCars) {
		this.csname = csname;
		this.TCars = TCars;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)

	@Column(name = "csid", unique = true, nullable = false)
	public Integer getCsid() {
		return this.csid;
	}

	public void setCsid(Integer csid) {
		this.csid = csid;
	}

	@Column(name = "csname")
	public String getCsname() {
		return this.csname;
	}

	public void setCsname(String csname) {
		this.csname = csname;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TCarstate")
	public Set<TCar> getTCars() {
		return this.TCars;
	}

	public void setTCars(Set<TCar> TCars) {
		this.TCars = TCars;
	}

}
